package com.zhuss.meeting.time;

import com.zhuss.bean.bo.meeting.room.ConfirmTimeBo;
import com.zhuss.bean.bo.meeting.room.GetSituationBo;
import com.zhuss.common.ReadService;
import com.zhuss.exception.WpsException;
import com.zhuss.meeting.processor.TimeRead;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

/**
 * @Author: zhushanshuo
 * @Date: 2020/2/12 19:39
 */
@Component("timeReadService")
public class TimeReadService implements ReadService<Object,Object>{

    @Autowired
    @Qualifier("timeRead")
    private TimeRead timeRead;

    @Override
    public Object detail(Object o) throws WpsException {
        return null;
    }

    @Override
    public Object list(Object o) throws WpsException {
        return null;
    }

    /**
     * 审核会议室
     * @throws WpsException
     */
    public void confirm(ConfirmTimeBo bo) throws WpsException {
        timeRead.confirm(bo);
    }

    /**
     * 获取会议室情况
     * @param o
     * @return
     * @throws WpsException
     */
    public Object getSituation(Object o) throws WpsException {
        GetSituationBo bo = (GetSituationBo)o;
        Object result = timeRead.getSituation(bo);
        return result;
    }
}
